import api from '../modules/api';


export default {
    namespaced:true,
    actions:{
        //------------------------获取专业信息数据-----------------------------------
        async getSubjects(context){
            const data = await api.subjects.getSubjects();
            return data
        },
        //------------------------新增专业信息数据-----------------------------------
        async addSubjects(context,newDate){
            const data = await api.subjects.addSubjects(newDate);
            return data
        },
        //------------------------删除专业信息数据-----------------------------------
        async deleteSubjects(context,_id){
            const data = await api.subjects.deleteSubjects(_id);
            return data
        },
        //------------------------修改专业名称---------------------------------------
        async updateSubjects(context,subject){
            const data = await api.subjects.updateSubjects(subject);
            return data
        },
    },
}












